home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD ROM Paradise Collection 4
/
CD ROM Paradise Collection 4 1995 Nov.iso
/
program
/
mkutil21.zip
/
MAKEDEFS
/
HC32.MK
< prev
next >
Wrap
Text File
|
1995-02-06
|
4KB
|
131 lines
#############################################################################
#
# Copyright (C) 1994 SciTech Software
# All rights reserved.
#
# Descripton: Generic DMAKE startup makefile definitions file. Assumes
# that the SCITECH environment variable has been set to point
# to where all our stuff is installed. You should not need
# to change anything in this file.
#
# Metaware High C/C++ 3.21 32 bit version. Supports Phar Lap's
# TNT DOS Extender.
#
# $Id: hc32.mk 1.1 1995/02/06 12:49:39 kjb release $
#
#############################################################################
# Disable warnings for macros redefined here that were given
# on the command line.
__.SILENT := $(.SILENT)
.SILENT := yes
# File suffix definitions
L := .lib # Libraries
E := .exe # Executables
O := .obj # Objects
A := .asm # Assembler sources
P := .cpp # C++ sources
# Import enivornment variables that we use
TMPDIR := $(ROOTDIR)/tmp
.IMPORT .IGNORE : TMPDIR COMSPEC INCLUDE LIB SCITECH DBG OPT SHW BETA
.IMPORT .IGNORE : FPU
# We use the MSDOS shell at all times
SHELL := $(COMSPEC)
GROUPSHELL := $(SHELL)
SHELLFLAGS := $(SWITCHAR)c
GROUPFLAGS := $(SHELLFLAGS)
SHELLMETAS := *"?<>
GROUPSUFFIX := .bat
DIRSEPSTR := \\
DIVFILE = $(TMPFILE:s,/,\)
# Default commands for compiling, assembling linking and archiving
CC := hc386 # C-compiler and flags
CFLAGS :=
AS := tasm # Assembler and flags
ASFLAGS := /mx /m /D__FLAT__ /i$(SCITECH)\INCLUDE
LD := hc386
LDFLAGS = $(CFLAGS)
LIB := 386lib # TNT 386|lib Librarian
LIBFLAGS := -TC
# Optionally turn on debugging information
.IF $(DBG)
CFLAGS += -g # Turn on debugging for C compiler
ASFLAGS += /zi # Turn on debugging for assembler
.END
# Optionally turn on optimisations
.IF $(OPT)
CFLAGS += -586 -O
.ELSE
CFLAGS += -O0
.END
# Optionally turn on direct i387 FPU instructions
.IF $(FPU)
CFLAGS += -DFPU387
ASFLAGS += -DFPU387
.END
# Optionally compile a shareware version of a product
.IF $(SHW)
LIB_DIR := LIBSW
CFLAGS += -DSHAREWARE
.ELSE
LIB_DIR := LIB
.END
# Optionally compile a beta release version of a product
.IF $(BETA)
CFLAGS += -DBETA
ASFLAGS += -DBETA
.END
# DOS extender dependant flags
USE_TNT := 1
DX_CFLAGS += -DTNT
DX_ASFLAGS += -DTNT
LDFLAGS += -LH:\TNT\LIB
# Place to look for PMODE library files
.IF NOT $(MK_PMODE)
PMLIB := tnt\pmode.lib
.END
# Define where to install library files
LIB_BASE := $(SCITECH)\$(LIB_DIR)\HC32
LIB_DEST := $(LIB_BASE)
# Definition of $(MAKE) macro for recursive makes.
MAKE = $(MAKECMD) $(MFLAGS)
# Macro to install a library file
INSTALL := cp
# Implicit generation rules for making object files
%$O: %.c ; +$(CC) $(CFLAGS) -c $<
%$O: %$P ; +$(CC) $(CFLAGS) -c $<
%$O: %$A ; +$(AS) $(ASFLAGS) $(<:s,/,\)
# Implicit rule for building a library file using response file
%$L: ; +$(LIB) $(LIBFLAGS) $@ @$(mktmp,$*.rsp -R $?)
# Implicit rule for building an executable file using response file
%$E: ; +$(LD) $(LDFLAGS) -o $@ @$(mktmp $(&:s/\/\\) $(PMLIB) $(EXELIBS) -ldosx32.lib)
# DMAKE uses this recipe to remove intermediate targets
.REMOVE :; $(RM) -f $<
# Turn warnings back to previous setting.
.SILENT := $(__.SILENT)
# We dont use TABS in our makefiles
.NOTABS := yes